package top.kaoshanji.p1ch03b;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 代码清单-p1ch03b-01：验证一下条件化bean
 * @author kaoshanji
 * ^_^
 * create time 2025/4/23 9:48
 */
public class MagicConfigMain {

    public static void main(String[] args) {

        // 创建magicBean bean....注释掉就不创建了
        System.setProperty("magic", "magic");

        ApplicationContext context = new AnnotationConfigApplicationContext(MagicConfig.class);

        System.out.println("...magicBean存在吗？" + context.containsBean("magicBean"));

    }

}
